#pragma once
#include "LogExecutor.h"

namespace Utility
{
    namespace LoggerLib
    {
        class CSystemEventExecutor : public IExecutor
        {
        public:
            CSystemEventExecutor(const wstring& strName);
            ~CSystemEventExecutor(void);

        public:
            virtual bool DoLogging(const LoggingEvent& event);
            virtual bool Reopen();
            virtual void Close();

        private:
            void SetEventLog(DWORD dwMaxSize=0x20000000, DWORD dwRetention=0x00000000);

        public:
            void RegEventSource();
            void Report(LPCTSTR pszText, WORD wType);
            WORD GetEventType(ELOGLEVEL level);
        };
    }
}
